package yt.demo.appcorequartz.job;

import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

@Component("testJob")
public class TestJob {
    public void run(String params) throws InterruptedException {
        Thread.sleep(3000);
        LocalDateTime now = LocalDateTime.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        String formattedDateTime = now.format(formatter);
        System.out.println("时间： "+ formattedDateTime);
        // job 逻辑
    }
}
